﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Free.Master" Inherits="System.Web.Mvc.ViewPage<Pp.Dto.PageList<Pp.Dto.AngelDto>>" %>

<%@ Import Namespace="Pp.Globalization" %>
<%@ Import Namespace="Pp.UI.Models" %>
<%@ Import Namespace="Pp.Core.Extentions" %>
<%@ Import Namespace="Pp.Dto" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h4 class="create-link">
        <%=Html.ActionLink(Res.Label_Create_New, "Create", "Angel", new { Id = Url.RequestContext.RouteData.Values["Id"] }, null)%></h4>
    <h2>
        <%=ViewData["Title"] %></h2>
    <%
        var count = 1;
        foreach (var dto in Model.List)
        {%>
    <div class="angels-box">
        <div style="margin: 0   0 -20px 0; padding: 0; text-align: right;">
            <span class="blue-link"><span><a href="/Angel/Edit/<%=dto.Id %>">
                <%=Res.Label_Edit  %></a></span> <a>| </a><span style="float: right;">
                    <%Html.RenderPartial("DeleteForm", new DeleteFormItem(Url.Action("Delete", "Angel"), dto.Id)); %></span>
            </span>
        </div>
        <h4>
            <%=dto.Name %>
        </h4>
        <img src="<%=dto.Id.ToMediumImageString(ImageType.Angel).ExistImage(Server,ImageType.Angel) %>" width="100" />
        <p>
            <%=dto.Description%></p>
    </div>
    <%if (count % 5 == 0)
      {%>
    <div style="height: 10px; width: 100%; float: left;">
    </div>
    <%} count++;
    %>
    <%} %>
    <% if (Model.List.Count > 0)
       {%>
    <%Html.RenderPartial("Pager", Model.PageInfo); %>
    <%}
       else
       {%>
    <%=Res.Label_No_Angel %>
    <%}%>
</asp:Content>
